package com.service;

import com.bean.RbacManager;
import com.dao.ManagerDao;

import java.util.List;
import java.util.Map;

public class ManagerServiceImpl implements ManagerService{

    private ManagerDao managerDao;

    public ManagerDao getManagerDao() {
        return managerDao;
    }

    public void setManagerDao(ManagerDao managerDao) {
        this.managerDao = managerDao;
    }

    @Override
    public List<Map<String, String>> findlist() {
        System.out.println("被代理的方法执行开始");
        System.out.println(managerDao);
        List<Map<String, String>> findlist = managerDao.findlist();
        findlist.forEach(System.out::println);
        System.out.println("被代理的方法执行结束");
        return findlist;
    }

    @Override
    public List<Map<String, String>> findbyname(String username) {
        System.out.println(managerDao);
        List<Map<String, String>> findlist = managerDao.findbyname(username);
        findlist.forEach(System.out::println);
        System.out.println("被代理的方法执行结束");
        return findlist;
    }

    @Override
    public int addOne(RbacManager rbacManager) {
        return 0;
    }

    @Override
    public int addForMap(Map<String, Object> userinfo) {
        return 0;
    }
}
